//
//  photoListCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/9/23.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "photoListCell.h"

@implementation photoListCell

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
//        self.contentView.backgroundColor = [UIColor clearColor];
        UIImageView *bgImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:bgImageView];
        bgImageView.image = [UIImage imageNamed:@"phtoBg"];
        [bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
        }];
        UIImageView *productView = [[UIImageView alloc] init];
        productView.backgroundColor = [UIColor redColor];
        [bgImageView addSubview:productView];
        [productView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(scaleLeftAndRight(160), scaleTopAndBottom(220)));
            make.left.equalTo(bgImageView.mas_left).offset(32.5);
            make.top.equalTo(bgImageView.mas_top).offset(34.5);
        }];
    }
    return self;
}


@end
